package com.jyw.business.obstacles.service.impl;

import java.util.List;
import com.jyw.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.jyw.business.obstacles.mapper.ObsOrderAssistMapper;
import com.jyw.business.obstacles.domain.ObsOrderAssist;
import com.jyw.business.obstacles.service.IObsOrderAssistService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;

/**
 * 报障-协作工单关系Service业务层处理
 * 
 * @author system
 * @date 2023-08-16
 */
@Service
public class ObsOrderAssistServiceImpl extends ServiceImpl<ObsOrderAssistMapper,ObsOrderAssist> implements IObsOrderAssistService
{
    @Resource
    private ObsOrderAssistMapper obsOrderAssistMapper;

    /**
     * 查询报障-协作工单关系
     * 
     * @param id 报障-协作工单关系主键
     * @return 报障-协作工单关系
     */
    @Override
    public ObsOrderAssist selectObsOrderAssistById(Long id)
    {
        return obsOrderAssistMapper.selectObsOrderAssistById(id);
    }

    /**
     * 查询报障-协作工单关系列表
     * 
     * @param obsOrderAssist 报障-协作工单关系
     * @return 报障-协作工单关系
     */
    @Override
    public List<ObsOrderAssist> selectObsOrderAssistList(ObsOrderAssist obsOrderAssist)
    {
        return obsOrderAssistMapper.selectObsOrderAssistList(obsOrderAssist);
    }

    /**
     * 新增报障-协作工单关系
     * 
     * @param obsOrderAssist 报障-协作工单关系
     * @return 结果
     */
    @Override
    public int insertObsOrderAssist(ObsOrderAssist obsOrderAssist)
    {
        obsOrderAssist.setCreateTime(DateUtils.getNowDate());
        return obsOrderAssistMapper.insertObsOrderAssist(obsOrderAssist);
    }

    /**
     * 修改报障-协作工单关系
     * 
     * @param obsOrderAssist 报障-协作工单关系
     * @return 结果
     */
    @Override
    public int updateObsOrderAssist(ObsOrderAssist obsOrderAssist)
    {
        return obsOrderAssistMapper.updateObsOrderAssist(obsOrderAssist);
    }

    /**
     * 批量删除报障-协作工单关系
     * 
     * @param ids 需要删除的报障-协作工单关系主键
     * @return 结果
     */
    @Override
    public int deleteObsOrderAssistByIds(Long[] ids)
    {
        return obsOrderAssistMapper.deleteObsOrderAssistByIds(ids);
    }

    /**
     * 删除报障-协作工单关系信息
     * 
     * @param id 报障-协作工单关系主键
     * @return 结果
     */
    @Override
    public int deleteObsOrderAssistById(Long id)
    {
        return obsOrderAssistMapper.deleteObsOrderAssistById(id);
    }
}
